#include<stdio.h>
#include<string.h>

int main()
{
	int m,n,t,i,j,num,max,flag;
	long long a[100010],b[100010];
	int c[100010];
	while (scanf("%d",&t)==1)
	{
		scanf("%d%d",&n,&m);
		for (i=1;i<=n;i++)
			scanf("%lld",&a[i]);
		for (i=1;i<=m;i++)
			scanf("%lld",&b[i]);
		memset(c,0,sizeof(c));
		num=0;
		for (i=1;i<=m;i++)
		{
			max=-1;
			flag=0;
			for (j=1;j<=n;j++)
			{
				if (a[j]<=b[i]&&c[j]==0&&a[j]>max)
				{
					flag=j;
					max=a[j];
				}
			}
			if (flag!=0)
				c[flag]=1;
			if (max!=-1)
				num++;
		}
		printf("%d\n",num);
	}
	return 0;
}
